﻿@model Model.Database.UserInfo
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <title>查看用户</title>
    <link href="~/Content/Scripts/bootstrap-3.3.5-dist/css/bootstrap.min.css" rel="stylesheet" />

    <style>
        body {
            overflow-x: hidden;
        }

        .table {
            width: 95%;
            margin: 0 auto;
            margin-top: 10px;
            margin-bottom: 10px;
            text-align: center;
        }

        .leftTd {
            width: 30%;
            font-weight: bold;
        }

        .rightTd {
            width: 70%;
        }

    </style>
    <!--引入脚本解决兼容性(hack技术，必须放入head中)-->
    <!--[if lt IE 9]>
        <script src="~/Content/Scripts/html5_css3/html5shiv.min.js"></script>
        <script src="~/Content/Scripts/html5_css3/respond.min.js"></script>
        <script src="~/Content/Scripts/PIE-2.0beta1/PIE_IE678.js"></script>
    <![endif]-->
</head>
<body>
    <form id="form1" method="post">
        <table class="table table-bordered table-hover table-condensed">
            <tr>
                <td class="leftTd">用户名</td>
                <td class="rightTd">
                    @Model.LoginName
                </td>
            </tr>
            <tr>
                <td class="leftTd">密码</td>
                <td class="rightTd">
                    @Model.LoginPassword
                </td>
            </tr>
            <tr>
                <td class="leftTd">昵称</td>
                <td class="rightTd">
                    @Model.Nickname
                </td>
            </tr>
            <tr>
                @{
                    string departmentName = "";
                    foreach (var department in Model.Departments)
                    {
                        departmentName += department.DepartmentName+",";
                    }
                }
                <td class="leftTd">部门</td>
                <td class="rightTd">
                    @departmentName
                </td>
            </tr>
            <tr>
                @{
                    string roleName = "";
                    foreach (var role in Model.Roles)
                    {
                        roleName += role.RoleName+",";
                    }
                }
                <td class="leftTd">角色</td>
                <td class="rightTd">
                    @roleName
                </td>
            </tr>
        </table>

    </form>
</body>
</html>
<script src="~/Content/Scripts/jquery-2.0.3.min.js"></script>
